package com.example.demo.bean;

import java.io.Serializable;
import java.util.List;
import com.github.pagehelper.PageInfo;
import lombok.Data;


@Data
public class ResultPageVO<T> implements Serializable {

    private static final long serialVersionUID = 6734544938995856594L;

    private List<T> result;

    private Page page;

    public ResultPageVO (PageInfo<T> pageInfo){
        this.result = pageInfo.getList();
        page = new Page();
        page.setPageSize(pageInfo.getPageSize());
        page.setTotal(pageInfo.getTotal());
        page.setCurrentPage(pageInfo.getPageNum());
    }

}
